<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    @include('public.h5_head')
    <title>订单详情</title>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/rem.js"></script>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/commoncss/common.css"/>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/info.css"/>
</head>
<script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/iscroll.js"></script>
<script src="{{ env('CDN_DOMAIN_NAME') }}/js/app.js"></script>
<script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/common.js"></script>

<body>
<div id="box_info">
    <div class="wrap">
        <div class="main_info">
            <div class="info_product">
                <div class="info_title">
                    <div class="info_icon">
                        <img src="/img/00004.png" alt="" />
                        <span>{{ $brand[$orders->brand_id] }}</span>
                    </div>
                </div>
                <div class="info_list" onclick="window.location.href='/produc?good_id={{ $orders->pro_id }}'">
                    @if($orders->is_owe)
                        <div class="bg_nod"></div>
                    @else

                    @endif
                    <div class="info_list_l">
                        <img src="{{ env('CDN_DOMAIN_NAME') }}/upload/{{ $orders->face }}" alt="" class="info_list_img" />
                    </div>
                    <div class="info_list_r">
                        <p class="info_list_tit">{{ $product->title }}</p>
                        <p class="info_price">￥{{ sprintf('%.2f',$orders->actual_price/$orders->num)  }}</p>
                        <p class="info_list_words">款号：{{ $orders->girard }}</p>
                        <p class="info_list_hue">颜色：{{ $orders->color }}</p>
                        <p class="info_list_postage">数量：{{ $orders->num }}手</p>
                    </div>
                </div>
                <ul class="info_ul">
                @if($orders->is_owe)
                    <li class="info_li">
                        <span class="info_money info_mon">首付金额</span><span class="info_price info_pri">￥{{ sprintf('%.2f',$orders->downpayment + $orders->postage_owe + $orders->postage_estimate) }}</span>
                    </li>
                    <li class="info_li">
                        <span class="info_money">首付比例</span><span class="info_price">{{ sprintf('%.2f',$orders->downpayment/$orders->actual_price * 100)  }}%</span>
                    </li>
                @else
                    <li class="info_li">
                        <span class="info_money info_mon">应付金额</span><span class="info_price info_pri">￥{{ sprintf('%.2f',$orders->actual_price + $orders->postage_owe + $orders->postage_estimate) }}</span>
                    </li>
                @endif
                    <li class="info_li"><span class="info_money">商品金额</span><span class="info_price">￥{{sprintf('%.2f',$orders->actual_price)}}</span></li>
                    <li class="info_li"><span class="info_money">邮费</span><span class="info_price">￥{{sprintf('%.2f',$orders->postage_estimate)}}</span></li>
                    <li class="info_li"><span class="info_money">往期欠款</span><span class="info_price">￥{{sprintf('%.2f',$orders->postage_owe)}}</span></li>
                </ul>
                @if($orders->paid == 0)
                <ul class="info_ul">
                    <li class="info_li"><span class="info_money info_mo">已付金额</span><span class="info_price info_pri">￥0.00</span></li>
                    <li class="info_li"><span class="info_money">商品金额</span><span class="info_price">￥0.00</span></li>
                    <li class="info_li"><span class="info_money">邮费</span><span class="info_price">￥0.00</span></li>
                    <li class="info_li"><span class="info_money">往期欠款</span><span class="info_price">￥0.00</span></li>
                </ul>
                    <ul class="info_ul">
                        <li class="info_li"><span class="info_money info_mo">未付金额</span><span class="info_price info_pri">￥{{ sprintf('%.2f',$orders->actual_price + $orders->postage_estimate + $orders->postage_owe - $orders->paid) }}</span></li>
                        <li class="info_li"><span class="info_money">商品金额</span><span class="info_price">￥{{sprintf('%.2f',$orders->actual_price)}}</span></li>
                        <li class="info_li"><span class="info_money">邮费</span><span class="info_price">￥{{sprintf('%.2f',$orders->postage_estimate)}}</span></li>
                        <li class="info_li"><span class="info_money">往期欠款</span><span class="info_price">￥{{sprintf('%.2f',$orders->postage_owe)}}</span></li>
                    </ul>
                @else
                    <ul class="info_ul">
                        <li class="info_li"><span class="info_money info_mo">已付金额</span><span class="info_price info_pri">￥{{ sprintf('%.2f',$orders->paid + $orders->postage_owe + $orders->postage_estimate) }}</span></li>
                        <li class="info_li"><span class="info_money">商品金额</span><span class="info_price">￥{{sprintf('%.2f',$orders->paid)}}</span></li>
                        <li class="info_li"><span class="info_money">邮费</span><span class="info_price">￥{{sprintf('%.2f',$orders->postage_estimate)}}</span></li>
                        <li class="info_li"><span class="info_money">往期欠款</span><span class="info_price">￥{{sprintf('%.2f',$orders->postage_owe)}}</span></li>
                    </ul>
                    <ul class="info_ul">
                        <li class="info_li"><span class="info_money info_mo">未付金额</span><span class="info_price info_pri">￥{{ sprintf('%.2f',$orders->actual_price - $orders->paid) }}</span></li>
                        <li class="info_li"><span class="info_money">商品金额</span><span class="info_price">￥{{ sprintf('%.2f',$orders->actual_price - $orders->paid) }}</span></li>
                        <li class="info_li"><span class="info_money">邮费</span><span class="info_price">￥0.00</span></li>
                        <li class="info_li"><span class="info_money">往期欠款</span><span class="info_price">￥0.00</span></li>
                    </ul>
                @endif
                <div class="info_number">
                    <p class="info_p">订单编号：{{ $orders->ordernum }}</p>
                    <p class="info_p">下单时间：{{ $orders->created_at }}</p>
                </div>
            </div>wechatBrowser?order_num={{ $orders->id }}" class="info_pass">去支付</a></div>
        @endif
    </div>
</body>
<script>
    scroll();
</script>
        </div>
    </div>
    @if($orders->status == 0 || $orders->status ==1)
    <div  class="info_btn"><a href="/userOrder/{{ $orders->id }}" class="info_pass">去支付</a></div>
        @elseif($orders->paid < $orders->actual_price && $orders->is_owe)
        <div  class="info_btn"><a href="/user/
</html>
